"TEXT 2"="Allow autostart for removable drives (diskettes, ZIP)"
"TEXT 3"="Allow autostart for fixed drives (HD)"
"TEXT 4"="Allow autostart for network drives"
"DESCRIPTION 1"="If you normally insert a CD in your CD-ROM-drive, Windows starts a program using the file AUTORUN.INF or displays a selection of commands you can execute. "
"DESCRIPTION 2"="This behaviour is known as "AutoPlay". By default, it's activated for the first three choices but you enable or disable other types of drives here also."
"DESCRIPTION 3"="IMPORTANT: If you activate AutoRun for removable devices or network drives, Windows will check these drives every time you open the Explorer or a file requester in an application. Because this check takes some time, this behavior can be really annoying. Please keep this in mind."
"AUTHOR"="Xteq Systems"
"CONTACTURL"="http://www.xteq.com"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
"COMMENT 1"="Thanks to Matthias Mei▀er [digi_c@web.de] for developing this Windows XP version with us."
"COMMENT 2"="This was a hell lot of work!"
"COMMENT 3"="Special thanks to Tony Caine (72614.1451@compuserve.com) who has helped us a lot with this plug-in. Also thanks to Guy (dr_teeth@bigfoot.com)."
"COMMENT 4"="Thanks to Sander Goudswaard [sander@goudswaard.cx] for the "...START vs ...RUN" notice!"
Call MsgWarning("The current AutoPlay feature settings in your registry are in an incorrect form (REG_BINARY instead of REG_DWORD). These values will be ignored and the default values, as they are out of the box, will be displayed.")
i=145
end if
'TH: Looks stupid, I know! but there is no way to get OR working with variants!
'AK: JScript ||. Should work
dim b1,b2,b3,b4,b5,b6,b7
i=OrHelper(i,DRIVE_FUTURE,b1)
i=OrHelper(i,DRIVE_RAMDISK,b2)
i=OrHelper(i,DRIVE_CDROM,b3)
i=OrHelper(i,DRIVE_REMOTE,b4)
i=OrHelper(i,DRIVE_FIXED,b5)
i=OrHelper(i,DRIVE_REMOVABLE,b6)
i=OrHelper(i,DRIVE_NO_ROOT,b7)
'//If the bit is set, AutoRun is DISABLED
Call SetBox(b3,1)
Call SetBox(b6,2)
Call SetBox(b5,3)
Call SetBox(b4,4)
END SUB
Function OrHelper(CurValue,CheckVal,CheckValSet)
i=CurValue
if i>=CheckVal then
CheckValSet=true
i=i-CheckVal
else
CheckValSet=false
end if
OrHelper=i
End Function
Sub SetBox(CurVal,Elm)
if CurVal=true then
SetUIElement elm,false
else
SetUIElement elm,true
end if
End Sub
'Called when the Plugin should validate the Data the user has entered
SUB Plugin_CheckData(ElementIndex)
END SUB
'Called when the Plugin should apply the changes
SUB Plugin_Apply(ElementIndex,ElementSubIndex)
i=0
'Always disable autorun for the following drives
'according to Q136214 from MS KB
i=i+DRIVE_UNKNOWN
i=i+DRIVE_FUTURE
'//Needed??? i=i+DRIVE_NO_ROOT
'No let's see what the user wants
if GetUIElement(1)=false then i=i+DRIVE_CDROM
if GetUIElement(2)=false then i=i+DRIVE_REMOVABLE
if GetUIElement(3)=false then i=i+DRIVE_FIXED
if GetUIElement(4)=false then i=i+DRIVE_REMOTE
Call RegWriteValue(sPathValue,i,2)
Call Logoff()
END SUB
'Called when the Plugin is about to be removed from memory